package org.dingfugui.triple.config.spring;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.w3c.dom.Element;

/**
 * Created by fugui.ding on 2015/3/23.
 */
public class ApplicationConfigParser implements BeanDefinitionParser {

    public ApplicationConfigParser() {
    }

    @Override
    public BeanDefinition parse(Element e, ParserContext ctx) {
        String name = e.getAttribute("name");

        //	new TripleContext().setApplicationConfig(applicationConfig);
        // RootBeanDefinition bean = new RootBeanDefinition();
        // bean.setBeanClass(ApplicationConfig.class);
        // bean.setLazyInit(false);
        // String id = "application";
        // ctx.getRegistry().registerBeanDefinition(id, bean);
        // bean.getPropertyValues().addPropertyValue("name", name);

        return null;
    }
}
